package com.hzw.saas.web.admin.hpc.param;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Future;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Date;

/**
 * @author sonam
 * @sine 2021/11/26 3:05 下午
 */
@Api
@Data
public class QCloudHpcAccountParam {

    @NotBlank(message = "用户ID不能为空")
    @ApiModelProperty(value = "用户ID")
    private String userId;

    @NotBlank(message = "slurm账号名不能为空")
    @ApiModelProperty(value = "slurm账号名")
    private String slurmAccount;

    @NotBlank(message = "hpc用户名不能为空")
    @ApiModelProperty(value = "hpc用户名")
    @Pattern(regexp = "^[a-z]([a-z0-9]|[_]){1,8}$", message = "HPC用户名，1-8个字符，可包含字母，数字，下划线")
    private String hpcAccountName;

    @NotNull(message = "核时不能为空")
    @ApiModelProperty(name = "核时")
    private Double coreTime;

    @NotNull(message = "HPC有效期不能为空")
    @Future(message = "必须大于今天")
    @ApiModelProperty(value = "过期时间")
    private Date expireTime;

}
